/**
 * Created by bethinner on 7/27/16.
 */
import React, { Component } from 'react';

import { connect } from 'react-redux'
import Link from 'react-router/lib/Link'
import browserHistory from 'react-router/lib/browserHistory'
import cookie from 'react-cookie'
import GreenButton from '../components/GreenButton'
import NavigationBar from '../components/NavigationBar'


export default class UserInfoContainer extends Component{
    constructor(props){
        super(props);

    }

    componentWillMount(){
        $('#loadingToast').hide();
    }

    logOff(){
        cookie.remove('mobile', { path: '/' });
        cookie.remove('smid', { path: '/' });
        browserHistory.push({
            pathname: `/index`
        });
    }

    render(){
        return(
            <div style={{background:"white",textAlign:"center",minHeight:"600px"}}>
                <NavigationBar Title="用户管理" LeftBar="true"/>
                <div style={{width:"76%",margin: "20% auto 0" ,textAlign:"left",fontSize:"16px"}}>
                    <img src="/public/img/user.png" style={{width:'24px',height:'24px',marginBottom:"-6px"}} />
                    用户名:{cookie.load('mobile')}
                </div>
                <div style={{backgroundColor:"#6BAC72",height:"1px" ,width:"76%",margin: "0 auto 20%"}}></div>
                <GreenButton onClick={this.logOff.bind(this)} text="退出登录"/>
            </div>

        )
    }
}

UserInfoContainer.defaultProps = {

}

UserInfoContainer.propTypes = {

}

module.exports = UserInfoContainer;
